package com.ubao.network;

public interface HttpListener {
    /**
     * actions that should be taken when a request has completed.
     * @param data
     */
    public void completed(ResponseInterface resp);

    /**
     * actions that should be taken when a <code>Request</code> object is indicating that the request cannot
     * be carried out due to thrown exceptions.
     * @param e
     * @param handler
     */
    public void exception(Exception e, HttpHandler handler);

    
    /**
     * 是否接受本次响应（判断响应的原始请求与当前请求是否一致）
     * 
     * @param request
     * @return
     */
    public boolean acceptResponse(RequestInterface request);// added by wyp 20110428
}
